
Create Procedure [MetodosPioraram] 
	@revisao_anterior int,
	@revisao_ATUAL int
	as
	Begin
	Select ROW_NUMBER() Over(ORDER BY recente.Maintainability asc) as i, recente.CyclomaticComplexity as CicloAtual, antiga.CyclomaticComplexity as CicloAnterior,
	recente.Maintainability as ManuAtual, antiga.Maintainability as ManuAnterior,
	recente.[NameSpace], recente.[Type], recente.Member, recente.Maintainability, recente.CyclomaticComplexity, recente.DepthOfInheritance,
	recente.ClassCoupling, recente.LinesOfCode From
	(select * from CodeMetric Where Revision = @revisao_ATUAL And Project in ('Fgv.SigaDois.Negoc (Debug)', 'Fgv.SigaDois.ConveniadoOnline.Servicos (Debug)')) recente,
	(select * from CodeMetric Where Revision = @revisao_anterior And Project in ('Fgv.SigaDois.Negoc (Debug)', 'Fgv.SigaDois.ConveniadoOnline.Servicos (Debug)')) antiga
	Where recente.[Type] = antiga.[Type] And recente.Project = antiga.Project And recente.Member = antiga.Member
	And recente.Scope = antiga.Scope And recente.[Scope] = 'Member'
	And recente.[Type] not in ('BaseServico', 'BaseNegoc')
	And recente.CyclomaticComplexity > antiga.CyclomaticComplexity
	End

GO


